const CssMinimizerWebpackPlugin = require('css-minimizer-webpack-plugin')
const TerserWebpackPlugin = require('terser-webpack-plugin')

module.exports = {
  mode: 'production', // 模式 development production
  output: {
    // filename: '[name].[contenthash].js', // 输出js文件名
    filename: 'scripts/[name].[contenthash].js', // 输出js文件名
    publicPath: 'http://localhost:8080/'
  },
  optimization: {
    minimizer: [
      new CssMinimizerWebpackPlugin(),
      new TerserWebpackPlugin()
    ],
  },
  performance: {
    hints: false
  }
}